{include file="header.inc.html"}
<style>
.sub{
	text-indent:30px;
}
.toggle,.editop{
	cursor:pointer;
}
</style>
<body class="layui-layout-body">

<script charset='utf-8' src='{#__APP__}/editor/kindeditor4/kindeditor-all-min.js'></script>
<script charset='utf-8' src='{#__APP__}/editor/kindeditor4/lang/zh-CN.js'></script>


<div class="layui-layout layui-layout-admin">
	  {include file="left.inc.html"}  
	  <div class="layui-body">
		<!-- 内容主体区域 -->
		<div style="padding: 15px;">


			<div class="layui-breadcrumb">
			   {include file="where.inc.html"}
			</div>




<form class="layui-form" action="" style="padding:10px;width:450px;">

<div class="layui-form-item">
    <label class="layui-form-label">文章分类</label>
    <div class="layui-input-block">{$category_select}</div>
  </div>
{foreach $fields as $k => $v}
 <div class="layui-form-item">
    <label class="layui-form-label">{$v.name}</label>
    <div class="layui-input-block">{$v.form}</div>
  </div>
 {/foreach}



  <div class="layui-form-item">
    <div class="layui-input-block">
      <button class="layui-btn" lay-submit lay-filter="formDemo" id="submit">立即提交</button>
      <a class="layui-btn" href="{_url mid=$mid}">返回列表页</a>
      

      <button type="reset" class="layui-btn layui-btn-primary">重置</button>


    </div>
  </div>
<input type="hidden" name="mid" value="{$mid}">
<input type="hidden" name="id" value="{$id}">
</form>
 


			{**###################################################**}
			
		</div>	
	  </div><!-- /layui-body -->


<script>
layui.use(['element', 'table','form','layer','laypage', 'layedit','upload'], function(){
  var element = layui.element,
  $ = layui.jquery,
  table = layui.table,
  form = layui.form,
  laypage = layui.laypage,
  layedit = layui.layedit,
  upload = layui.upload,
  element = layui.element,
  layer = layui.layer;
	
	
	/*执行前,先同步编辑器内容*/
	$('#submit').click(function(){
		for(i = 0; i < KindEditor.instances.length; i++){
			KindEditor.instances[i].sync()
		}
	});
	formSubmit('{_url m="doedit"}','formDemo','comfirm:{_url m="index" mid=$mid}');
	
});


function setCheck(class_id, a){
	
	layui.$('.'+class_id).prop('checked',a);
}



</script>

{include file="footer.inc.html"}



